<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>问题合同查询</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<link rel="stylesheet" href="css/select.css">
	<style>
		.text-name {
		    display: inline-block;
		    padding: 5px 0px;
		    color: #666;
		    width: auto;
		    font-size: 14px;
		    text-align: right;
		}
		.content-table-three tbody tr td {
		    max-width: 350px;
		    min-width: 100px;
		}
		.content-table-three thead tr td span {
	    	color: #4d5971;
		    display: inline-block;
		    word-wrap: break-word;
		    width: auto;
		    line-height: 20px;
		    vertical-align: top;
		    margin-top: 10px;
		}
		.content-table-three tbody tr td p {
		    text-align: right;
		    padding-left: 12px;
		}
		.content-table-three tbody tr td span{
			padding-right: 12px;
		}
		.content-table-three thead tr td:nth-child(2) span {
		    color: #4d5971;
		    display: inline-block;
		    word-wrap: break-word;
		    width: 300px;
		    line-height: 20px;
		    vertical-align: top;
		    margin-top: 10px;
		}
		.content-table-three thead tr td:last-child {
		    line-height: 40px;
		    background: #F9FBFF;
		    text-align: right;
		    padding-right: 12px;
		}
		.content-table-three thead tr td:last-child span {
		    color: #4d5971;
		    display: inline-block;
		    width: auto;
		    line-height: 20px;
		    vertical-align: top;
		    margin-top: 10px;
		}
		.content-table-three tbody tr td:nth-child(1){
			width: 190px;
		}
		.content-table-three tbody tr td:nth-child(2){
			width: 160px;
		}
		.content-table-three tbody tr td:nth-child(3){
			width: 205px;
		}
		.content-table-three tbody tr td:nth-child(4){
			width: 195px;
		}
		.content-table-three tbody tr td:nth-child(5){
			width: 230px;
		}
		.content-table-three tbody tr td:nth-child(6){
			width: 70px !important;
			min-width: 70px;
		}
		.content-table-three tbody tr td:nth-child(1) span{
			width: 75px;
		}
		.content-table-three tbody tr td:nth-child(2) span{
			width: 70px;
		}
		.content-table-three tbody tr td:nth-child(3) span{
			width: 115px;
		}
		.content-table-three tbody tr td:nth-child(4) span{
			width: 105px;
		}
		.content-table-three tbody tr td:nth-child(5) span{
			width: 105px;
		}
		.content-table-three tbody tr:nth-child(2) td p {
		    text-align: left;
		}
		.content-table-three tbody tr:nth-child(2) td p>span {
		    width: auto;
		}
		.color-operation:hover {
		    text-decoration:underline; 
		    cursor: pointer;
		}
		.content-form input {
		    width: 120px;
		}
	</style>
</head>
<body>
	<div class="main-content">
		<div class="main-bg">
			<p class="content-title">问题合同查询</p>
			<form id = "contractDetail">
				<input type = "hidden" name = "statusList[0]" value = "9">
				<input type = "hidden" name = "statusList[1]" value = "10">
				<input type = "hidden" name = "statusList[2]" value = "5">
				<div class="content-form">
					<ul>
						<li><span class="text-name">项目名称：</span><input type="text" name = "projectname"></li>
						<li><span class="text-name">客户名称：</span><input type="text" name = "custname"></li>
						<li><span class="text-name">退回快递单号：</span><input type="text" name = "problemtracknumber"></li>
						<li><span class="text-name">签收状态：</span>
						<select class="multiselect" id="single" name = "status">
							<option value = "">全部</option>
							<option value="9">未签收</option>
							<option value="10">已签收</option>
							<option value="5">已撤回</option>
						</select></li>
						<li><button class="btn-style-two" onclick = "return false" id = "search">搜索</button><i class="btn-operation maleft20">重置</i></li>
					</ul>
				</div>
			</form>
			<div class="content-list"> 
				<div class="info-list">
					<div class="info-list" dataTableTable = "true" bindForm="contractDetail" bindClick = "search" dataAction = "/contractDetail/findList">
						<table class="content-table-three" cellspacing="0" cellpadding="0">
							<thead>
								<tr>
									<td>项目编号：<span name = "projectcode" type = "table"></span></td>
									<td colspan="3">项目名称：<span name = "projectname" type = "table"></span></td>
									<td colspan="2">签收状态：<span name = "status" type = "table"></span></td>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>
										<p>纸质合同编号：<span name = "contractcode" type = "table"></span></p>
										<p>预约金额：<span type = "table" name = "app.balance"></span></p>
									</td>
									<td>
										<p>客户编号：<span type = "table" name = "app.custcode"></span></p>
										<p>客户名称：<span type = "table" name = "app.custname"></span></p>
									</td>
									<td>
										<p>所属部门：<span type = "table" name = "app.departmentname"></span></p>
										<p>理顾姓名：<span type = "table" name = "app.isname"></span></p>
									</td>
									<td>
										<p>签收人：<span type = "table" name = "problemSignBy.name" type = "table"></span></p>
										<p>签收时间：<span type = "table" name = "problemSignDate"></span></p>
									</td>
									<td>
										<p>退回快递单号：<span class="color-operation" onclick="seeLogistics()" type  = "table" name = "problemtracknumber"></span></p>
										<p>原回寄快递单号：<span class="color-operation" onclick="seeLogistics()" type  = "table" name = "returntracknumber"></span></p>
									</td>
									<td>
										<i class="btn-operation" onclick="del(this)">撤销退回</i>
										<i class="btn-operation" onclick="problemContractsign(this)">签收</i>
									</td>
								</tr>
								<tr>
									<td colspan="6">
										<p>退回说明：<span type = "table" name = "remark"></span></p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<!-- <div class="table-pages clearfix">
			<ul class="pages-list">
				<li><a href=""><</a></li>
				<li><a class="menu-active" href="">1</a></li>
				<li><a href="">2</a></li>
				<li><a href="">3</a></li>
				<li><a href="">...</a></li>
				<li><a href="">20</a></li>
				<li><a href="">></a></li>
			</ul>
		</div> -->
	</div>
	<script type="text/javascript" src = "js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src = "lib/layer/2.4/layer.js"></script>
	<script type="text/javascript" src = "js/select.jquery.js"></script>
	<script type="text/javascript" src = "js/util.js"></script>
	<script type="text/javascript" src = "js/tableTable.js"></script>
	<script type="text/javascript">
        $(document).ready(function (){//新增
			$('.multiselect').multiselect({setMaxOptionNum:4,selectedHtmlValue:''});
			$('#single').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 140+'px'});
			$('#single1').multiselect({multiple:false,selectedHtmlValue:'全部',setWidth: 140+'px'});
		});

        function seeLogistics(){
        	parent.layer.open({
			      type: 2,
			      title: '查看物流',
			      shadeClose: true,
			      shade: 0.2,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['870px', '450px'],
			      content: 'seeLogistics.html'
			    });
        }
        function problemContractsign(my){
        	var $my = $(my);
        	var index = $my.parent().parent().parent().parent().find("thead").find("input").val();
        	var data = $("div[dataTable='true']").getAllTableData()[index];
        	parent.setData(data);
        	parent.layer.open({
			      type: 2,
			      title: '问题合同签收',
			      shadeClose: true,
			      shade: 0.2,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['870px', '450px'],
			      content: 'problemContractsign.html'
			});
        }
        function  del(my){
        	var $my = $(my);
        	var index = $my.parent().parent().parent().parent().find("thead").find("input").val();
        	var data = $("div[dataTable='true']").getAllTableData()[i];
        	var param = new FormData();
        	param.append("id",data.id);
        	parent.layer.confirm('确定撤销退回么？', {
				btn: ['确定','取消'] //按钮
			}, function(){
				$.ajax({
			        type: 'post',
			        url:baseUrl + "/contractDetail/problemCansel",
			        contentType: false,  
			        processData: false, 
			        async: false,
			        data:param
				}).done(function(dt){
					parent.layer.msg("撤销成功");
					$("div[dataTableTable = 'true']").ECDATableTable();
				});
			},function(){
				parent.layer.closeAll();
			});
		}
        function tableCallBack(my){
        	var data = my.getAllTableData();
        	var tables = my.find("table");
        	console.log(data);
        	for(var i = 0 ; i < data.length ; i++){
        		if(data[i].status == "10"){
        			$(tables[i]).find("tbody").find("tr").find("td").eq(5).find("i").remove();
        		}
        	}
		}
        function getHeight(){
            var myiframeH=$(".main-content").height();
            var _parent=$(window.parent.document);
            _parent.find('body').css('height',(myiframeH+150)+'px');
            _parent.find('.main-position').css('height',(myiframeH+100)+'px');
        };
        $('.main-content').resize(function(){
            getHeight();
        });
	</script>

</body>
</html>